module.exports = function (sequelize, DataTypes) {
    return sequelize.define('hero', {
        id: {
            type: DataTypes.INTEGER,
            primaryKey: true,
            allowNull: true,
            autoIncrement: true
        },
        name: {
            type: DataTypes.STRING
        },
        avatar: {
            type: DataTypes.STRING
        },
        bgc: {
            type: DataTypes.STRING
        },
        title: {
            type: DataTypes.STRING
        },
        //建立score表,一对一关联
        score_id: {
            type: DataTypes.INTEGER,
            allowNull: false,
        },

        //建立Tips表,一对一关联
        tips_id: {
            type: DataTypes.INTEGER,
            allowNull: false,
        },
    }, {
            freezeTableName: true
        });
}